//
//  WSQPickerTextField.h
//  RACTest
//
//  Created by 翁胜琼 on 2018/10/15.
//  Copyright © 2018 翁胜琼. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "WSQPickerTextFieldItem.h"


typedef NS_ENUM(NSUInteger, WSQPickerTextFieldStyle) {
    WSQPickerTextFieldStyleDefault = 0,
    WSQPickerTextFieldStyleDatePicker,
    WSQPickerTextFieldStyleDropDown,
};
NS_ASSUME_NONNULL_BEGIN

@interface WSQPickerTextField : UIView


/************************ 数据设置 ************************/

@property (copy,nonatomic) NSString *text;
@property (copy,nonatomic) NSArray *selectedRows;   // 被选择的 row 的数组

@property (nonatomic,assign) IBInspectable CGFloat cornerRadius;
@property (nonatomic,assign) IBInspectable CGFloat borderWidth;
@property (nonatomic,strong) IBInspectable UIColor *borderColor;


- (NSInteger)numberOfRowsInComponent:(NSInteger)component;
- (void)setItems:(NSArray *)items inComponent:(NSInteger)component; // 最多五列


- (void)reloadAllComponents;
- (void)reloadComponent:(NSInteger)component;

/************************ UI 设置 ************************/
@property (nonatomic,assign) WSQPickerTextFieldStyle style;
@property (copy,nonatomic) NSString *placeholder;
@property (nonatomic,assign) CGFloat fontSize;





/************************ 初始化方法 ************************/

- (instancetype)initWithFrame:(CGRect)frame preferredStyle:(WSQPickerTextFieldStyle)style;

@end

NS_ASSUME_NONNULL_END
